import 'package:flutter/cupertino.dart';

import '../my-container.dart';

class FeatureArea extends StatelessWidget {
  final List<Map<String, String>> data;
  FeatureArea({this.data});

  List<Widget> _featureArea() {
    List<Widget> list = [];
    for (int i = 0; i < data.length; i++) {
      list.add(
        Column(
          children: [
            MyContainer(
                margin: [0.0, 0.0, 0.0, 5.0],
                child: Text(
                  data[i]["value"],
                  style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold),
                )),
            Text(data[i]["label"])
          ],
        ),
      );
    }
    return list;
  }

  @override
  Widget build(BuildContext context) {
    return MyContainer(
        child: Row(
            children: _featureArea(),
            mainAxisAlignment: MainAxisAlignment.spaceAround));
  }
}
